package com.dd.ent.car.common.player;

/**
 * Author:LiuJianSheng
 * Date:2016/7/27
 */
public abstract class PlayerMessage implements Runnable{
    private MediaPlayerWrapper mediaPlayer;

    public PlayerMessage(MediaPlayerWrapper mediaPlayer) {
        this.mediaPlayer = mediaPlayer;
    }

    @Override
    public void run() {
        beforeMessaegRun();
        runMessage();
        finishMessage();
    }

    public void beforeMessaegRun(){}
    
    public abstract void runMessage();

    public void finishMessage(){}
    
    protected MediaPlayerWrapper getMediaPlayer(){
        return mediaPlayer;
    }
}
